home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / binutils.7 / binutils / binutils-2.7 / gas / config / tc-sh.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-04  |  3.5 KB  |  109 lines

  1. /* This file is tc-sh.h
  2.  
  3.    Copyright (C) 1993, 94, 95, 1996 Free Software Foundation, Inc.
  4.  
  5.    This file is part of GAS, the GNU Assembler.
  6.  
  7.    GAS is free software; you can redistribute it and/or modify
  8.    it under the terms of the GNU General Public License as published by
  9.    the Free Software Foundation; either version 2, or (at your option)
  10.    any later version.
  11.  
  12.    GAS is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.    GNU General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU General Public License
  18.    along with GAS; see the file COPYING.  If not, write to
  19.    the Free Software Foundation, 59 Temple Place - Suite 330,
  20.    Boston, MA 02111-1307, USA.  */
  21.  
  22. #define TC_SH
  23.  
  24. /* This macro translates between an internal fix and an coff reloc type */
  25. #define TC_COFF_FIX2RTYPE(fix) ((fix)->fx_r_type)
  26.  
  27. #define BFD_ARCH bfd_arch_sh
  28.  
  29. extern int shl;
  30.  
  31. #define COFF_MAGIC (shl ? SH_ARCH_MAGIC_LITTLE : SH_ARCH_MAGIC_BIG)
  32.  
  33. /* Whether -relax was used.  */
  34. extern int sh_relax;
  35.  
  36. /* When relaxing, we need to generate relocations for alignment
  37.    directives.  */
  38. #define HANDLE_ALIGN(frag) sh_handle_align (frag)
  39. extern void sh_handle_align PARAMS ((fragS *));
  40.  
  41. /* We need to force out some relocations when relaxing.  */
  42. #define TC_FORCE_RELOCATION(fix) sh_force_relocation (fix)
  43. extern int sh_force_relocation ();
  44.  
  45. /* We need to write out relocs which have not been completed.  */
  46. #define TC_COUNT_RELOC(fix) ((fix)->fx_addsy != NULL)
  47.  
  48. #define TC_RELOC_MANGLE(seg, fix, int, paddr) \
  49.   sh_coff_reloc_mangle ((seg), (fix), (int), (paddr))
  50. extern void sh_coff_reloc_mangle ();
  51.  
  52. #define IGNORE_NONSTANDARD_ESCAPES
  53.  
  54. #define tc_coff_symbol_emit_hook(a) ; /* not used */
  55.  
  56. #define DO_NOT_STRIP 0
  57. #define DO_STRIP 0
  58. #define LISTING_HEADER (shl ? "Hitachi Super-H GAS Little Endian" : "Hitachi Super-H GAS Big Endian")
  59. #define NEED_FX_R_TYPE 1
  60. #define RELOC_32 1234
  61.  
  62. #define TC_KEEP_FX_OFFSET 1
  63.  
  64. #define TC_COFF_SIZEMACHDEP(frag) tc_coff_sizemachdep(frag)
  65. extern int tc_coff_sizemachdep PARAMS ((fragS *));
  66.  
  67. #define md_operand(x)
  68.  
  69. extern const struct relax_type md_relax_table[];
  70. #define TC_GENERIC_RELAX_TABLE md_relax_table
  71.  
  72. #define tc_frob_file sh_coff_frob_file
  73. extern void sh_coff_frob_file PARAMS (());
  74.  
  75. /* We align most sections to a 16 byte boundary.  */
  76. #define SUB_SEGMENT_ALIGN(SEG)                    \
  77.   (strncmp (obj_segment_name (SEG), ".stabstr", 8) == 0        \
  78.    ? 0                                \
  79.    : ((strncmp (obj_segment_name (SEG), ".stab", 5) == 0    \
  80.        || strcmp (obj_segment_name (SEG), ".ctors") == 0    \
  81.        || strcmp (obj_segment_name (SEG), ".dtors") == 0)    \
  82.       ? 2                            \
  83.       : 4))
  84.  
  85. /* We use a special alignment function to insert the correct nop
  86.    pattern.  */
  87. extern int sh_do_align PARAMS ((int, const char *, int));
  88. #define md_do_align(n,fill,len,l) if (sh_do_align (n,fill,len)) goto l
  89.  
  90. /* We record, for each section, whether we have most recently output a
  91.    CODE reloc or a DATA reloc.  */
  92. struct sh_segment_info_type
  93. {
  94.   int in_code : 1;
  95. };
  96. #define TC_SEGMENT_INFO_TYPE struct sh_segment_info_type
  97.  
  98. /* We call a routine to emit a reloc for a label, so that the linker
  99.    can align loads and stores without crossing a label.  */
  100. extern void sh_frob_label PARAMS ((void));
  101. #define tc_frob_label(sym) sh_frob_label ()
  102.  
  103. /* We call a routine to flush pending output in order to output a DATA
  104.    reloc when required.  */
  105. extern void sh_flush_pending_output PARAMS ((void));
  106. #define md_flush_pending_output() sh_flush_pending_output ()
  107.  
  108. /* end of tc-sh.h */
  109.